//
//  VIPtipView.m
//  ChatForHot
//
//  Created by FLY on 2018/10/18.
//  Copyright © 2018年 FLY. All rights reserved.
//

#import "VIPtipView.h"

@implementation VIPtipView


- (instancetype)init{
    if (self = [super init]) {
        
        [self addSubview:self.HOTCHATbackView];
        [self addSubview:self.HOTCHATvipImgView];
        [self addSubview:self.HOTCHATtitleLab];
        
        [self.HOTCHATbackView mas_updateConstraints:^(MASConstraintMaker *make) {
            
            make.edges.equalTo(self).with.insets(UIEdgeInsetsMake(3, 5, 3, 5));
        }];
        
        [self.HOTCHATvipImgView mas_updateConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self.HOTCHATbackView).mas_offset(15);
            make.centerY.equalTo(self);
        }];
        [self.HOTCHATtitleLab mas_updateConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self.HOTCHATvipImgView.mas_right).mas_offset(10);
            make.centerY.equalTo(self.HOTCHATvipImgView);
            make.height.mas_equalTo(24);
        }];
    }
    return self;
}
- (UIImageView *)HOTCHATvipImgView{
    if (_HOTCHATvipImgView == nil) {
        _HOTCHATvipImgView = [[UIImageView alloc] init];
        _HOTCHATvipImgView.image = [UIImage imageNamed:@"msg_vip_only"];
    }
    return _HOTCHATvipImgView;
}
- (UILabel *)HOTCHATtitleLab{
    if (_HOTCHATtitleLab == nil) {
        _HOTCHATtitleLab = [[UILabel alloc] init];
        _HOTCHATtitleLab.font = [UIFont systemFontOfSize:12];
        _HOTCHATtitleLab.textColor = HOTCHATrgb(255, 191, 0);
        _HOTCHATtitleLab.textAlignment = NSTextAlignmentLeft;
        _HOTCHATtitleLab.text = NSLocalizedString(@"novip04", nil);
    }
    return _HOTCHATtitleLab;
}
- (UIView *)HOTCHATbackView{
    if (_HOTCHATbackView == nil) {
        _HOTCHATbackView = [[UIView alloc] init];
        _HOTCHATbackView.backgroundColor = [UIColor whiteColor];
        _HOTCHATbackView.layer.cornerRadius = 8;
        _HOTCHATbackView.clipsToBounds = YES;
//        _HOTCHATbackView.layer.borderColor = HOTCHATrgb(230,230,230).CGColor;
//        _HOTCHATbackView.layer.borderWidth = 0.5;
    }
    return _HOTCHATbackView;
}


@end
